CC=arm-apple-darwin-cc
LD=$(CC)
LDFLAGS=-lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit

all:	MobileTetrominos install

MobileTetrominos:	main.o MTApp.o MTTetrominosView.o MTTetrominosEngine.o MTTetrominosBoard.o MTTetrominosPiece.o MTTetrominosPreviewPane.o
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

install: 
		cp MobileTetrominos Tetromino.app
		
upload:
		echo -e "-mkdir /Applications/Tetromino.app\n-put ./Tetromino.app/* /Applications/Tetromino.app/" |sftp root@192.168.0.15 -b-

clean:
		rm -f *.o MobileTetrominos
